package org.huntaway.manager.po;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import org.huntaway.entity.impl.CommonEntity;

@Entity
@Table(name = "sys_file", catalog = "admin", uniqueConstraints = {
		@UniqueConstraint(columnNames = "FILE_NAME"),
		@UniqueConstraint(columnNames = "FILE_PATH") })
public class SysFile extends CommonEntity {
	private int id;
	private int version;	
	private String name;
	private String path;
	private String parent;
	private long lastModified;
	private long length;
	private String remark;
	private String desc;
	private String insertUser;
	private Date insertTime;
	private String updateUser;
	private Date updateTime;
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "FILE_ID", unique = true, nullable = false)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	@Column(name = "VERSION", unique = true, nullable = false, length = 10)
	public int getVersion() {
		return version;
	}
	public void setVersion(int version) {
		this.version = version;
	}
	
	@Column(name = "FILE_NAME", unique = true, nullable = false, length = 255)
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "FILE_PATH", unique = true, nullable = false, length = 255)
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	@Column(name = "FILE_PARENT", unique = true, nullable = false, length = 255)
	public String getParent() {
		return parent;
	}
	public void setParent(String parent) {
		this.parent = parent;
	}
	@Column(name = "LAST_MODIFIED", unique = true, nullable = false)
	public long getLastModified() {
		return lastModified;
	}
	public void setLastModified(long lastModified) {
		this.lastModified = lastModified;
	}
	@Column(name = "FILE_LENGTH", unique = true, nullable = false)
	public long getLength() {
		return length;
	}
	public void setLength(long length) {
		this.length = length;
	}
	@Column(name = "DICT_REMARK", unique = true, nullable = true, length = 100)
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	@Column(name = "DICT_DESC", unique = true, nullable = true, length = 255)
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	@Column(name = "INSERT_USER", unique = true, nullable = true, length = 10)
	public String getInsertUser() {
		return insertUser;
	}
	public void setInsertUser(String insertUser) {
		this.insertUser = insertUser;
	}
	@Column(name = "INSERT_TIME", unique = true, nullable = true)
	public Date getInsertTime() {
		return insertTime;
	}
	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}
	@Column(name = "UPDATE_USER", unique = true, nullable = true, length = 10)
	public String getUpdateUser() {
		return updateUser;
	}
	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}
	@Column(name = "UPDATE_TIME", unique = true, nullable = true)
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}
